﻿using DE_MVC_WyFy.Areas.Administrator.Models;
using DE_MVC_WyFy.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DE_MVC_WyFy.BLL
{
	public class AppHelper
	{
		public const String ImageSlider ="/Upload/Slider/";
		public const String ImageFashsion = "/Upload/fashsion/";
		public const String Path = "~/";
		public static String Price(Object price)
		{
			return String.Format("{0:0,0} VNĐ", price);
		}
		public static String Description(String des)
		{
			return des.Substring(0, des.Count() > 30 ? 30 : des.Count()) + "...";
		}
		public static String Sex(Product prod)
		{
			bool sex = true;
			sex = ProductType.Objects.GetById(prod.ProductTypeID).IsMale;
			return sex ? "Nam" : "Nữ";
		}
	}
}